﻿#region Copyright ©2008-2009, Technische Universitaet Muenchen
// ====================================================================================================
//
// Last Changed by       $Author: then $
// Last Changed Date     $LastChangedDate: 2009-05-15 14:42:13 +0200 (Fri, 15 May 2009) $
// Last Changed Revision $Rev: 139 $
//
// ====================================================================================================
#endregion

using System.Collections.Generic;
using System.Xml;
using Tum.CollabXT.SPEM.Resources;

namespace Tum.CollabXT.SPEM
{
    public class Product : IProduct
    {
        #region Private Members
        private string _Id;
        private string _Name;
        private string _TypeName;
        private string _Description;
        private Dictionary<string, object> _ExtendedData = new Dictionary<string, object>();

        private bool _IsInitial;
        private bool _IsExternal;
        private bool _HasDocumentTemplate;
        private string _DocumentTemplatePath = string.Empty;
        private string _DisciplineId;
        #endregion

        public Product() { }
        public Product(XmlNode node) 
        {
            _Id = node.Attributes["id"].Value;
            _Name = node.Attributes["name"].Value;
            _Description = node.Attributes["briefDescription"].Value;
        }

        #region IProduct Members

        public bool IsInitial
        {
            get { return (_IsInitial); }
            set { _IsInitial = value; }
        }

        public bool IsExternal
        {
            get { return _IsExternal; }
            set { _IsExternal = value; }
        }

        public bool HasDocumentTemplate
        {
            get { return (_HasDocumentTemplate); }
            set { _HasDocumentTemplate = value; }
        }

        public string DocumentTemplatePath
        {
            get { return (_DocumentTemplatePath); }
            set { _DocumentTemplatePath = value; }
        }

        public string DisciplineId
        {
            get { return (_DisciplineId); }
            set { _DisciplineId = value; }
        }

        public string TypeName
        {
            get { return _TypeName; }
            set { _TypeName = value; }
        }

        #endregion

        #region IProcessElement Members

        public string Id
        {
            get { return (_Id); }
            set { _Id = value; }
        }

        public string Name
        {
            get { return (_Name); }
            set { _Name = value; }
        }

        public string Description
        {
            get { return (_Description); }
            set { _Description = value; }
        }

        public Dictionary<string, object> ExtendedData
        {
            get { return _ExtendedData; }
        }

        #endregion
    }
}
